-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move optdata and version file generation up to MSBuild from build-runtime #58674
Move optdata and version file generation up to MSBuild from build-runtime #58674
Conversation
…s up into the managed scripts. The native build scripts will now by default copy a fallback version file in place if the version files do not exist and will disable PGO if no pgo file path is passed in to the build-runtime scripts. This removes all cases of build-runtime calling into MSBuild.
…uild-runtime no longer calls into any MSBuild processes.
Tagging subscribers to this area: @hoyosjs Issue DetailsMove optdata and version file generation from the native build scripts up into the managed scripts. The native build scripts will now by default copy a fallback version file in place if the version files do not exist and will disable PGO if no pgo file path is passed in to the build-runtime scripts. This removes all cases of build-runtime calling into MSBuild, which removes the last MSBuild-in-Batch/Bash-in-MSBuild process nesting we have in the product build (there's still some in the test build). This PR also renames the
|
# Build/Generate native prerequisites | ||
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -subset clr.nativeprereqs $(crossArg) -arch $(archType) $(osArg) -c $(buildConfig) $(officialBuildIdArg) -ci /bl:$(Build.SourcesDirectory)artifacts/log/$(buildConfig)/CoreCLRNativePrereqs.binlog | ||
displayName: Build and generate native prerequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the common msbuild entry point to build the CoreCLR runtime and by that avoid the msbuild invocation here and the extra AzDO specific OutputPgoPathForCI
target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spoke with @jkotas before doing this work and he said that he still doesn't want us to call into CMake/Ninja from MSBuild if we can avoid it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sharing my thoughts from my conversation with Jeremy:
- Designs where one build driver (msbuild) is wrapping another build driver (ninja) are very hard to debug.
- I think it is important to have a reasonable way to build the unmanaged runtime without a working managed runtime for bootstrapping on new platforms.
- Things like version files are non-essential and it is easy to replace them with placeholder files. I do not see a problem with using C# to generate them. I would actually prefer to use C# to generate them. It would be nice to get rid of the python dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* It would be nice to get rid of the python dependency.
For eventpipe generator as well (can be replaced with C++ shim/macros as done for numa and openssl shims). We could also try to get rid of perl dependency, we have some headers generators still written in perl (which not many folks use in this day and age).. 🙂
Co-authored-by: Viktor Hofer <[email protected]> Co-authored-by: Jan Kotas <[email protected]>
…ct to be more static-graph friendly.
c82f25d
to
790204b
Compare
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Juan Hoyos <[email protected]>
Thanks for this @jkoritzinsky |
@jkoritzinsky It looks like this breaks the JIT rolling build, e.g.:
https://dev.azure.com/dnceng/internal/_build?definitionId=902 which is built in a clean enlistment with:
cc @dotnet/jit-contrib |
@BruceForstall I'll put out a PR to generate the version files for that pipeline to unblock it. Once that's out, I'll investigate what part of the version fallback doesn't work. |
Thanks. btw, it's trivial to repro this on a clean enlistment (no |
#60981 should have a fix. Is there a public pipeline I can run to validate the fix or are all of the affected pipelines internal-only? |
You can trigger the "runtime-coreclr superpmi-replay" pipeline, which also uses build-jit-job.yml |
That's a 2+ hour pipeline, but the build is a pre-req that happens quickly, and first. |
So is the model that you can't call Should the pipeline invoke the root build.cmd, e.g.,
instead? |
Doing that does a few things (dotnet CLI install, wasm restores?) before invoking |
build-runtime.cmd won't work on a raw enlistment if you're trying to do a full native build. It should work for the jits though. @jkoritzinsky shouldn't this pass in that case? Just copy the phony files and skip PGO? |
Yes, but it looks like there's a bit with the fallback files that doesn't work quite right that I missed in my testing. |
I see https://github.com/dotnet/runtime/blob/main/eng/native/version/runtime_version.h RuntimeProductVersion is blank @jkoritzinsky was this intentional? It's supposed to be version. We could just have it be the 42.42.42... thing that arcade uses |
Move optdata and version file generation from the native build scripts up into the managed scripts. The native build scripts will now by default copy a fallback version file in place if the version files do not exist and will disable PGO if no pgo file path is passed in to the build-runtime scripts.
This removes all cases of build-runtime calling into MSBuild, which removes the last MSBuild-in-Batch/Bash-in-MSBuild process nesting we have in the product build (there's still some in the test build).
This PR also renames the
clr.dactools
subset toclr.nativeprereqs
to reflect its expanded role.